package com.yiya.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.yiya.bean.SerOrderInfo;
import com.yiya.model.SerOrderInfoCplex;
import com.yiya.model.SerOrderInfoCplexModel;
import com.yiya.model.SerOrderInfoExample;

public interface SerOrderInfoMapper {
    int countByExample(SerOrderInfoExample example);

    int deleteByExample(SerOrderInfoExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(SerOrderInfo record);

    int insertSelective(SerOrderInfo record);

    List<SerOrderInfo> selectByExample(SerOrderInfoExample example);

    SerOrderInfo selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") SerOrderInfo record, @Param("example") SerOrderInfoExample example);

    int updateByExample(@Param("record") SerOrderInfo record, @Param("example") SerOrderInfoExample example);

    int updateByPrimaryKeySelective(SerOrderInfo record);

    int updateByPrimaryKey(SerOrderInfo record);
    
    /**
     * 获取维修单
     * @param model
     * @return
     */
    List<SerOrderInfoCplex> selectByModel(SerOrderInfoCplexModel model); 
    
    /**
     * 获取维修单记录数
     * @param model
     * @return
     */
    int countByModel(SerOrderInfoCplexModel model);
    
    /**
     * 获取指定用户未完成的维修单数
     * @param model
     * @return
     */
    int selectUnfinishedOrderCount(SerOrderInfoCplexModel model);
}